RiverSync
SPEC-DDD-MNT · v0.7
28 June 2026
Owner: Platform team

Maintenance — the agreement bounded context

The correlating spine of the platform: the MaintenanceTier catalog (Silver · Gold) and the per-device MaintenanceAgreement records that reference a tier — each with its own renewal date — the derived customer↔partner links, the 1:1 access grants with their scope switches, and the single scope resolver every partner-facing read passes through. A core subdomain: the per-device agreement is RiverSync's service product.

DraftCore subdomainAgreement · coverage · scope
Drill-down of the master domain architecture. Requirements: SPEC-PRD (PRT-1…8) + PRD-PAR. Boundaries, routes and events render from domain/domain-catalog.js — definitions are never copied per document.

1Ownership & boundaries

Maintenance owns the MaintenanceTier catalog and the per-device MaintenanceAgreement record that Account manages, Portal displays under its Maintenance menu, Partners works, Sales creates and Admin attaches. PartnerCustomer is derived — recomputed from agreement events, never inserted (SVC-10) — and the 1:1 AccessGrant and the single partner-scope resolver live here (SVC-6). The commercial partner channel — program tiers, subtypes (distributor · reseller) and the reseller↔distributor distribution agreements — moved to Sales (SVC-13); the maintenance tier and the partner program tier remain two separate vocabularies that never mix.

Reads from: Devices (DeviceId) · Tenancy (customer and partner orgs) · Sales (SourceDeal · partner program tier for the link list). Serves: Devices, Support and Structure call /maintenance/scope for every partner-scoped read (SVC-6).

2Ubiquitous language

The words this context uses — "coverage" means the scope of an agreement here and nowhere else.

3Aggregates & invariants

The consistency boundaries — one root each, guarding its invariants in a single transaction; cross-aggregate ties are by identity.

4Context relationships

How this context meets its neighbours. Maintenance is an open-host service — its scope resolver is the one place partner read-scope is computed.

5Physical view — the service API

The deployment mapping: this context becomes the Maintenance service. Paths relative to api.riversync.com/v1; access notation per the master.

RiverSync Co., Ltd. · BangkokSPEC-DDD-MNT · 1 of 2

6Domain events

The past-tense facts this context publishes (and consumes) — its share of the platform's published language.

7Invariants in play

The modeling rules that bind this context — the master holds the full set; data integrity stays with the ERD drill-downs.

8Revision history

VersionDateChanges
0.112 Jun 2026First draft — split proposed with SPEC-DDD v0.1
0.212 Jun 2026Channel registry — PartnerProfile.Subtype, DistributionAgreement + registration routes and events (PRT-9…10, DM-22…23, SVC-13)
0.315 Jun 2026Renamed Coverage → Agreement domain (SVC-AGR · /agreement). Entities Maintenance → MaintenanceAgreement, DeviceMaintenance → DeviceAgreement; coverage is now the scope an agreement covers, not a domain name. Cascaded across PRD / ERD / Workflow / menus.
0.426 Jun 2026Renamed Agreement → Maintenance domain (SVC-MNT · /maintenance · SPEC-DDD-MNT). The partner channel registry — PartnerProfile (program tier + subtype) and DistributionAgreement — moved to Sales (SVC-13 reworded); Maintenance now owns the agreement catalog, per-device DeviceAgreement, the derived PartnerCustomer, AccessGrant and the scope resolver. Routes re-prefixed /agreement → /maintenance; new Maintenance PRD (SPEC-PRD-MNT).
0.526 Jun 2026Entity rename: the per-device record is the maintenance agreement. MaintenanceAgreement → MaintenanceTier (Silver · Gold catalog, aligning with the DS TierBadge) and DeviceAgreement → MaintenanceAgreement. Owned-entity cards, routes and the lead re-render from the catalog; owns list is now MaintenanceTier · MaintenanceAgreement · PartnerCustomer · AccessGrant.
0.627 Jun 2026FK naming convention (SPEC-ERD v0.20) — PartnerOrganization → PartnerId, CustomerOrganization → CustomerId and the derived PartnerLink → PartnerCustomer in the owned-entity cards, routes and lead. Catalog-driven re-render; no boundary change.
0.728 Jun 2026Reframed as a Domain-Driven Design context (with the set, SPEC-DDD v0.14) — leads with ubiquitous language & aggregates (MaintenanceAgreement, MaintenanceTier, PartnerCustomer) and the context relationships (open-host scope resolver; the Sales partnership across the agreement lifecycle). Classified a core subdomain; the API is demoted to the physical view. No ownership change.
RiverSync Co., Ltd. · BangkokSPEC-DDD-MNT · 2 of 2